var myModule = angular.module('MyModule', []);

myModule.controller('MyCtrl', ['$scope', function($scope){
	$scope.loadData = function() {
		console.log('加载数据中...');
	}
}]);

myModule.controller('MyCtrl2', ['$scope', function($scope) {
	$scope.loadData2 = function(){
		console.log('加载数据中...222222222');
	}
}]);

myModule.directive('loader', function() {
	return {
		restrict : 'AE',
		link : function(scope, element, attrs) {
			element.bind('mouseenter', function(event) {
				scope.$apply(attrs.howtoload);
			});
		}
	}
});